package com.ctshk.rpc.tour.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ctshk.rpc.tour.dto.schedule.SeriesTripScheduleDefaultCostDTO;
import com.ctshk.rpc.tour.dto.schedule.SeriesTripScheduleDefaultCostGroupDTO;
import com.ctshk.rpc.tour.dto.schedule.TripScheduleCostDTO;
import com.ctshk.rpc.tour.entity.SeriesTripScheduleDefaultCost;
import com.ctshk.rpc.tour.mapper.SeriesTripScheduleDefaultCostMapper;
import com.ctshk.rpc.tour.req.TripDefaultCostReq;
import com.ctshk.rpc.tour.service.ISeriesTripScheduleDefaultCostService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 团期成本分摊默认 服务实现类
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-01-21
 */
@Service
public class SeriesTripScheduleDefaultCostServiceImpl extends ServiceImpl<SeriesTripScheduleDefaultCostMapper, SeriesTripScheduleDefaultCost> implements ISeriesTripScheduleDefaultCostService {

    @Override
    public String getDefaultCostByTripId(Long id) {
        return baseMapper.getDefaultCostByTripId(id);
    }

//    @Override
//    public List<SeriesTripScheduleDefaultCostDTO> getDefaultCost(List<Long> ids) {
//        List<SeriesTripScheduleDefaultCost> defaultCost = baseMapper.getDefaultCost(ids);
//        ArrayList<SeriesTripScheduleDefaultCostDTO> defaultCostReqs = new ArrayList<>();
//        defaultCost.forEach(item -> {
//            SeriesTripScheduleDefaultCostDTO seriesTripScheduleDefaultCostDTO = new SeriesTripScheduleDefaultCostDTO();
//            BeanUtils.copyProperties(item,seriesTripScheduleDefaultCostDTO);
//            defaultCostReqs.add(seriesTripScheduleDefaultCostDTO);
//        });
//        return defaultCostReqs;
//    }

}
